//
//  UIImageView+ObserverCamera.m
//  Rail
//
//  Created by hychen on 2018/3/3.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "UIImageView+ObserverCamera.h"
#import <objc/runtime.h>

static void *observerCameraHasImageKey = &observerCameraHasImageKey;

@implementation UIImageView (ObserverCamera)

- (void)setHasImage:(BOOL)hasImage {
    objc_setAssociatedObject(self, &observerCameraHasImageKey, @(hasImage), OBJC_ASSOCIATION_ASSIGN);
}

- (BOOL)hasImage {
    return [objc_getAssociatedObject(self, &observerCameraHasImageKey) boolValue];
}

@end
